package com.bnyy.health;

import com.bnyy.common.ResponseData;
import com.bnyy.health.bean.BloodPressDetail;
import com.bnyy.health.bean.BloodPressReport;
import com.bnyy.health.bean.BloodPressureWeekly;
import com.bnyy.health.bean.BloodPressureWeeklyHistory;
import com.bnyy.health.bean.HomePaegHealthData;
import com.bnyy.health.bean.Limit;
import com.bnyy.health.bean.MedicationRecord;
import com.bnyy.health.bean.MedicationRecordCalendar;

import java.util.ArrayList;

import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import rx.Observable;

public interface HealthDataRetrofitService {
    /**
     * 获取血压详情
     */
    @POST("app/health/blood_press")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<BloodPressDetail>> getBloodPressDetail(@Body RequestBody requestBody);

    /**
     * 获取用药记录日历
     */
    @POST("app/health/medications/calendar")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<MedicationRecordCalendar>> getMedicationRecordCalendar(@Body RequestBody requestBody);

    /**
     * 获取用药记录
     */
    @POST("app/health/medications/list")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ArrayList<MedicationRecord>>> getMedicationRecord(@Body RequestBody requestBody);

    /**
     * 添加用药记录
     */
    @POST("app/health/medications")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> addMedicationRecord(@Body RequestBody requestBody);

    /**
     * 删除用药记录
     */
    @POST("app/health/medications/del")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> deleteMedicationRecord(@Body RequestBody requestBody);

    /**
     * 血压报告
     */
    @POST("app/health/blood_press/report")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<BloodPressReport>> getBloodPressReport(@Body RequestBody requestBody);

    /**
     * 血压报告
     */
    @POST("app/health/blood_press/score")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<BloodPressDetail.Score>> updateBloodPressEvaluation(@Body RequestBody requestBody);

    /**
     * 首页健康数据
     */
    @POST("app/health/home")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ArrayList<HomePaegHealthData>>> getHomePaegHealthData(@Body RequestBody requestBody);

    /**
     * 获取警戒值
     */
    @POST("app/wear/warn/list")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Limit>> getHealthDataLimit(@Body RequestBody requestBody);

    /**
     * 保存警戒值
     */
    @POST("app/wear/warn/set")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> saveHealthDataLimit(@Body RequestBody requestBody);

    /**
     * 生成/更新血压健康周报
     */
    @POST("app/health/week_report/generate")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<Object>> generateBloodPressureWeekly(@Body RequestBody requestBody);

    /**
     * 获取血压健康周报历史
     */
    @POST("app/health/week_report/history")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<ArrayList<BloodPressureWeeklyHistory>>> getBloodPressureWeeklyHistory(@Body RequestBody requestBody);

    /**
     * 获取血压健康周报
     * id : 根据周报id获取
     * user_id : 根据用户id获取
     */
    @POST("app/health/week_report")
    @Headers({"Content-Type: application/json","Accept: application/json"})
    Observable<ResponseData<BloodPressureWeekly>> getBloodPressureWeekly(@Body RequestBody requestBody);
}







































